import {App, PluginSettingTab, Setting} from "obsidian";
import DailyNotesMergePlugin from "./main";
import {CommonSingleJobUI, CommonRecursivelyJobUI, GeneralUI} from "./common";

export class SettingTab extends PluginSettingTab {
    plugin: DailyNotesMergePlugin;
    generalUI: GeneralUI;
    commonSingleJobUI: CommonSingleJobUI;
    commonRecursivelyJobUI: CommonRecursivelyJobUI;

    constructor(app: App, plugin: DailyNotesMergePlugin) {
        super(app, plugin);
        this.plugin = plugin;
        this.generalUI = new GeneralUI(this.containerEl, plugin);
        this.commonSingleJobUI = new CommonSingleJobUI(this.containerEl, plugin);
        this.commonRecursivelyJobUI = new CommonRecursivelyJobUI(this.containerEl, plugin);
    }

    display(): void {
        this.containerEl.empty();
        this.generalUI.display();
        this.commonSingleJobUI.display();
        this.commonRecursivelyJobUI.display();
    }
}